package com.ssy.lingxi.pay.api.common.allInPay;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 通联错误代码
 *
 * @author lqa
 * @version 2.0.0
 * @date 2021/12/5
 */
public enum AllInPayErrorCodeEnum {
    //系统类错误
    PARAMETER_ERROR(10000, "参数错误"),
    PARAMETER_CANNOT_BE_EMPTY(10001, "参数不能为空"),
    PARAMETER_SERVICE_ERROR(10002, "参数service错误"),
    PARAMETER_METHOD_ERROR(10003, "参数method错误"),
    THE_PARAMETER_LENGTH_IS_TOO_LONG(10004, "参数长度超长"),
    CONCURRENCY_ERROR(10005, "并发错误"),
    //应用类错误
    APPLICATION_DOES_NOT_EXIST(20000, "应用不存在"),
    THE_APPLICATION_DOES_NOT_ACTIVATE_THE_B_2_C_MODE(20001, "应用没有开通B2C模式"),
    THE_APP_DOES_NOT_OPEN_CROSS_APP_TRANSFER(20002, "应用没有开通跨应用转账"),
    APP_DOES_NOT_HAVE_PERMISSION_USE_THIS_INTERFACE(20003, "应用没有权限使用此接口"),
    THE_USER_DOES_NOT_HAVE_A_PASSWORD_CONFIRM_PAYMENT(20004, "用户没有开通密码确认支付"),
    THE_USER_IS_NOT_SUBSCRIBED_THREE_ELEMENT_BINDING_CARD(20005, " 用户没有开通三要素绑卡"),
    DECODING_ERROR(20006, "解码错误"),
    OVERCOME_THE_PERSONAL_TIE_CARD_NUMBER_OF_SETTINGS(20007, "超了个人绑卡设置的数量"),
    SMALL_B_BINDS_PERSONAL_CARD_PERMISSIONS_NOT_TURNED_ON_OR_SET(20008, "小B绑个人卡权限没有开启或设置"),
    CHANNEL_MERCHANT_INFORMATION_ERROR(20009, "渠道商户信息错误"),
    WRONG_PASSWORD(20010, "密码错误"),
    VERIFICATION_CODE_ERROR(20011, "验证码错误"),
    UNSUPPORTED_DOCUMENT_TYPE(20012, "不支持的证件类型"),
    UNSUPPORTED_REQUEST_SOURCE(20013, "不支持的请求来源（如手机、PC）"),
    BANK_CODE_ERROR(20014, "银行代码错误"),
    THE_EXPIRATION_TIME_IS_SET_INCORRECTLY(20015, "过期时间设置错误"),
    ENCRYPTION_FAILED(20016, "加密失败"),
    DECRYPTION_FAILED(20017, "解密失败"),
    SIGNATURE_FAILED(20018, "签名失败"),
    SIGNATURE_VERIFICATION_FAILED(20019, "签名验证失败"),
    THE_BANK_CARD_DOES_NOT_SUPPORT_WITHDRAWAL_OR_PAYMENT_OR_DECODING_ERROR(20020, "该银行卡不支持提现或代付/解码错误"),
    CACHE_OPERATION_ERROR(20021, "缓存操作错误"),
    REPEAT_REQUEST(20022, "请求流水重复"),
    MERCHANT_SYSTEM_USER_ID_ERROR(20023, "商户系统用户标识错误"),
    YUN_SHANG_TONG_BANK_CODE_IS_NOT_CONFIGURED(20024, "云商通银行代码未配置"),
    PAYEE_CLEARING_BANK_NUMBER_NOT_CONFIGURED(20025, "收款方清算行号未配置"),
    SUPPLEMENTARY_RECORD_PHOTOCOPY_INFORMATION(20026, "请调用【影印件采集及设置企业信息（H5）】补录影印件信息"),
    THE_WITHDRAWAL_AMOUNT_EXCEEDS_THE_CHANNEL_LIMIT(20027, "提现金额超出通道限额"),
    //用户类错误
    USER_ALREADY_EXISTS(30000, "用户已经存在"),
    USER_DOES_NOT_EXIST(30001, "用户不存在"),
    USER_HAS_BEEN_LOCKED(30002, "用户已经被锁"),
    USER_HAS_BEEN_ACTIVATED(30003, "用户已经激活"),
    THE_USER_IS_ALREADY_A_DEVELOPER(30004, "用户已经是开发者"),
    THE_USER_IS_NOT_A_DEVELOPER(30005, "用户不是开发者"),
    INCORRECT_USER_TYPE(30006, "用户类型不正确"),
    USER_HAS_BEEN_AUTHENTICATED_WITH_REAL_NAME(30007, "用户已经实名认证"),
    THE_USER_HAS_NOT_BEEN_AUTHENTICATED_YET(30008, "用户还未实名认证"),
    FAILED_TO_VERIFY_REAL_NAME_INFORMATION(30009, "验证实名信息失败"),
    USER_HAS_SET_LOGIN_SMS_NOTIFICATION(300010, "用户已经设置登录短信通知"),
    USER_HAS_SET_LOGIN_EMAIL_NOTIFICATION(300011, "用户已经设置登录邮箱通知"),
    ID_VERIFICATION_FAILED(300012, "身份证验证失败"),
    TEMPLATE_TYPE_ERROR(300013, "模板类型错误"),
    FAILED_TO_BIND_BANK_CARD(300014, "绑定银行卡失败"),
    FAILED_TO_UNBIND_BANK_CARD(300015, "解绑银行卡失败"),
    BANK_CARD_BINDING_RECORD_DOES_NOT_EXIST(300016, "银行卡绑定记录不存在"),
    THE_BANK_CARD_HAS_BEEN_BOUND(300017, "该银行卡已绑定"),
    ACCOUNT_SET_ERROR(300018, "账户集错误"),
    ACCOUNT_SET_DOES_NOT_EXIST(300019, "账户集不存在"),
    EMAIL_ALREADY_EXISTS(300020, "邮箱已经存在"),
    UNBOUND_PHONE(300021, "未绑定手机"),
    USER_UNAVAILABLE(300022, "用户不可用"),
    CORPORATE_MEMBERS_HAVE_BEEN_REVIEWED(300023, "企业会员已审核"),
    PHONE_HAS_BEEN_BOUND(300024, "已绑定手机"),
    ENTERPRISE_INFORMATION_IS_NOT_SET(300030, "未设置企业信息"),
    PAYMENT_PASSWORD_HAS_BEEN_SET(300031, "支付密码已设置"),
    THE_PAYMENT_PASSWORD_IS_NOT_SET(300032, "支付密码未设置"),
    WRONG_PAYMENT_PASSWORD_EXCEEDS_LIMIT(300033, "支付密码错误超限制"),
    INCOMPLETE_BANK_CARD_SIGNED_CERTIFICATION(300034, "银行卡未完成签约认证"),
    REAL_NAME_AUTHENTICATION_HAS_BEEN_CARRIED_OUT(300035, "已进行实名认证"),
    NO_MEMBER_SECURITY_LEVEL_IS_SET(300036, "未设置会员安全等级"),
    MEMBER_SECURITY_LEVEL_IS_LOW_DOES_NOT_SUPPORT_CURRENT_OPERATION(300037, "会员安全等级低不支持当前操作"),
    THE_REAL_NAME_PAYMENT_RECORD_DOES_NOT_EXIST_OR_HAS_COMMIT(300038, "该条实名付记录不存在或者已经确认"),
    BANK_CARD_REAL_NAME_PAYMENT_VERIFICATION_IS_NOT_COMPLETED(300039, "银行卡未完成实名付验证"),
    INCORRECT_CARD_TYPE(300040, "卡类型不正确"),
    BANK_CARD_IS_NOT_BOUND_TO_MOBILE_PHONE_NUMBER(300041, "银行卡未绑定手机号"),
    ENTERPRISE_AUTHENTICATION_FAILED(300042, "企业认证失败"),
    MEMBER_HAS_SIGNED_AN_ELECTRONIC_AGREEMENT(300043, "会员已签订电子协议"),
    THE_BANK_CARD_DOES_NOT_EXIST(300044, "该银行卡不存在"),
    THE_BANK_CARD_IS_NOT_BOUND(300045, "该银行卡未绑定"),
    THE_MEMBER_HAS_NOT_SIGNED_AN_ELECTRONIC_AGREEMENT(300046, "会员未签订电子协议"),
    THIS_BANK_CARD_IS_NOT_CURRENTLY_SUPPORTED(300047, "暂不支持该银行卡"),
    MEMBER_HAVE_NOT_OPENED_A_WEALTH_MANAGEMENT_ACCOUNT(300048, "会员未开通理财账户"),
    THE_CARD_BIN_DOES_NOT_EXIST_IN_THE_CARD_BIN_TABLE(300049, "卡bin在卡bin表中不存在"),
    CORPORATE_MEMBERS_NOT_REVIEWED(300050, "企业会员未审核"),
    ACCOUNT_SET_DOES_NOT_SUPPORT_QUERY(300051, "账户集不支持查询"),
    THE_BALANCE_TRANSFER_AGREEMENT_HAS_BEEN_SIGNED(300052, "余额转账协议已签约"),
    THE_BALANCE_PAYMENT_AGREEMENT_DOES_NOT_EXIST(300053, "余额支付协议不存在"),
    PROTOCOL_INFORMATION_DOES_NOT_MATCH(300054, "协议信息不匹配"),
    THE_AGREEMENT_IS_TERMINATED_NO_NEED_TO_CANCEL(300055, "协议为解约状态无需解约"),
    PROTOCOL_STATUS_ERROR(300056, "协议状态错误"),
    USER_APPLICATION_DOES_NOT_MATCH(300057, "用户应用不匹配"),
    THE_PAYEE_DOES_NOT_EXIST(300058, "收款人不存在"),
    THE_PAYEE_CANNOT_BE_THE_PLATFORM(300059, "收款人不能为平台"),
    THIS_PRIVILEGED_MEMBER_HAS_NO_CALLING_RIGHTS(300060, "该特权会员没有调用权限"),
    NO_PROVISIONING_INFORMATION_IS_CONFIGURED(300061, "未配置备付金信息"),
    NON_ACTIVATED_DEPOSITORY_SUB_ACCOUNT(300062, "未开通存管机构子账户"),
    THIS_MEMBER_HAS_NOT_OPENED_THIS_ACCOUNT_SET(300063, "该会员未开通此账户集"),
    BACKGROUND_NOTIFICATION_ADDRESS_NOT_CONFIGURED(300064, "后台通知地址未配置"),
    ERRORS_RELATED_TO_THE_PROVISION_OF_FUNDS(300065, "备付金配置相关错误"),
    CORPORATE_BANK_CARDS_CANNOT_BE_UNBOUND(300066, "企业对公银行卡不允许解绑"),
    NEW_PHONE_NUMBER_AND_ORIGINAL_PHONE_NUMBER_UNANIMOUS(300067, "新手机号与原手机号一致"),
    TYPE_OF_CERTIFICATE_AND_THE_REAL_NAME_CERTIFICATE_TYPE_DOES_NOT_MATCH(300068, "证件类型和实名证件类型不符"),
    REAL_NAME_AUTHENTICATION_INFORMATION_AND_ORIGINAL_REAL_NAME_AUTHENTICATION_INFORMATION_INCONSISTENT(300069, "实名认证信息与原实名认证信息不一致！"),
    CASHIER_TREASURE_TIED_CARD_ID_TYPE_ONLY(300070, "收银宝绑卡仅限身份证类型！"),
    NUMBER_AUTHENTICATION_SERVICE_FAILED(300071, "号码认证服务失败"),
    INCOMPLETE_MEMBER_INFORMATION(300072, "会员信息不全"),
    OCR_RECOGNIZES_THAT_THE_ROUTE_IS_NOT_CONFIGURED(300073, "OCR识别路由未配置"),
    MOBILE_PHONE_NUMBER_AND_ID_NUMBER_THE_NUMBER_OF_BOUND_MEMBERS_IS_NOT_CONFIGURED(300074, "手机号及证件号绑定会员数未配置"),
    MOBILE_PHONE_NUMBER_BINDING_MEMBERSHIP_LIMIT(300075, "手机号绑定会员数限制"),
    NUMBER_OF_MEMBERS_BOUND_TO_ID_NUMBER_LIMIT(300076, "证件号绑定会员数限制"),
    BUSINESS_LICENSEHAS_BEEN_IDENTIFIED_AND_PASSED(300077, "营业执照已经识别通过，不需要重新上传"),
    LEGAL_PERSON_ID_HAS_BEEN_IDENTIFIED(300078, "法人身份证已经识别通过，不需要重新上传"),
    //订单类错误
    ORDER_DOES_NOT_EXIST(40000, "订单不存在"),
    ITEM_TYPE_DOES_NOT_MATCH(40001, "商品类型不匹配"),
    ORDER_ERROR(40002, "订单错误"),
    THE_ORDER_HAS_EXPIRED(40003, "订单已过期"),
    THE_ORDER_IS_NOT_UNPAID(40004, "订单不是未支付状态"),
    ORDER_AMOUNT_AND_INCONSISTENT_PAYMENT_AMOUNT(40005, "订单金额和支付金额不一致"),
    PAYMENT_FAILED(40006, "支付失败"),
    PRODUCT_ALREADY_EXISTS(40007, "商品已存在"),
    PRODUCT_TYPE_DOES_NOT_EXIST(40008, "商品类型不存在"),
    NO_PAYMENT_CHANNEL_AVAILABLE(40009, "没有可用的支付通道"),
    TRANSACTION_TYPE_DOES_NOT_EXIST(40010, "交易类型不存在"),
    INSUFFICIENT_RESERVE_ACCOUNT_FEES(40011, "准备金账户手续费不足"),
    DOES_NOT_SUPPORT_CREDIT_CARDS(40012, "不支持信用卡"),
    COMMODITY_ENTRY_FAILED(40013, "商品录入失败"),
    INSUFFICIENT_ACCOUNT_BALANCE(40014, "账户余额不足"),
    TRADING_RULE_RESTRICTIONS(40015, "交易规则限制"),
    THE_HANDLING_FEE_IS_GREATER_THAN_THE_AMOUNT(40016, "手续费大于金额"),
    DUPLICATE_ORDER_NUMBER(40017, "订单号重复,请更换订单号再发起交易"),
    WRONG_ORDER_TYPE(40018, "订单类型错误"),
    ORDER_STATUS_ERROR(40019, "订单状态错误"),
    WRONG_ORDER_AMOUNT(40020, "订单金额错误"),
    STRONG_REAL_NAME_AUTHENTICATION_ERROR(40021, "强实名认证错误"),
    ORDER_AND_USER_DO_NOT_MATCH(40022, "订单和用户不匹配"),
    THE_VALUE_OF_REFUND_TYPE_IS_INCORRECT(40023, "退款类型refundType取值有误"),
    PAYMENT_CHANNEL_CONFIGURATION_DOES_NOT_EXIST(40025, "应用的支付通道配置不存在"),
    NO_PAYMENT_AUTHORITY(40026, "没有支付权限"),
    NO_WITHDRAWAL_PAYMENT_METHOD_IS_SET(40027, "没有设置提现支付方式"),
    WRONG_TRANSACTION_VERIFICATION_METHOD(40028, "交易验证方式错误"),
    URL_FORMAT_ERROR(40029, "URL格式错误"),
    WITHDRAWAL_PAYMENT_CHANNEL_ACCOUNT_NOT_CONFIGURED(40030, "出金支付通道会计科目未配置"),
    HANDLING_FEE_NOT_SET(40031, "手续费未设置"),
    CHANNEL_BANK_IS_NOT_SET(40032, "通道银行未设置"),
    DUPLICATE_ORDER_CONFIRMATION(40033, "订单确认重复"),
    MISMATCHED_PAYMENT_CHANNEL_ATTRIBUTES(40034, "支付通道属性不匹配"),
    WITHDRAWAL_ONLY_SUPPORTS_T0T1(40035, "提现只支持T0T1"),
    MISSING_PAYMENT_LINE_NUMBER(40036, "缺少支付行号"),
    INCORRECT_PAYMENT_LINE_NUMBER_FORMAT(40037, "支付行号格式错误"),
    THE_ORIGINAL_ORDER_DOES_NOT_SUPPORT_REFUNDS(40039, "原订单不支持退款,请联系商户处理"),
    INSUFFICIENT_ORDER_AMOUNT(40040, "代收订单金额不足"),
    THE_ORIGINAL_ORDER_HAS_NOT_BEEN_PAID(40041, "原订单未完成支付，无法发起退款"),
    THIS_WITHDRAWAL_METHOD_DOES_NOT_SUPPORT(40042, "该提现方式不支持"),
    THIS_WITHDRAWAL_METHOD_DOES_NOT_HAVE_PERMISSION(40043, "该提现方式没有权限"),
    DATE_FORMAT_IS_WRONG(40044, "日期格式有误"),
    RISK_CONTROL_OVER_A_SINGLE_DAY_CUMULATIVE_NUMBER(40045, "风控超限单日累计笔数"),
    RISK_CONTROL_LIMITS_THE_AMOUNT_OF_A_SINGLE_ORDER(40046, "风控限制订单单笔金额"),
    RISK_CONTROL_OVER_A_SINGLE_DAY_CUMULATIVE_AMOUNT(40047, "风控超限单日累计金额"),
    MEMBER_IS_NOT_BOUND_TO_VSP_CUS_ID(40048, "会员未绑定vspCusid"),
    PAYMENT_METHOD_VSP_CUS_ID_AND_BIND_WITH_THE_RECEIVING_MEMBER_VSP_CUS_ID_AND_INCONSISTENT(40049, "支付方式vspCusid与收款会员绑定vspCusid不一致"),
    PRODUCT_TYPE_OR_PRODUCT_NUMBER_INCONSISTENT_WITH_THE_PAYEE(40050, "商品类型或商品编号与收款人不一致"),
    APPLICATION_PAYMENT_CHANNEL_CONFIGURATION_DOES_NOT_EXIST(40051, "应用的支付通道配置不存在"),
    TOTAL_NUMBER_OF_PRODUCT_NUMBERS_AND_THE_TOTAL_NUMBER_OF_TRANSACTIONS_IS_INCONSISTENT(40052, "产品号的总数和总笔数不一致！"),
    REGISTERED_MEMBER_OF_TONG_LIAN_WALLET_ERROR(40055, "通联钱包注册会员异常！"),
    THE_SUB_LEDGER_DATA_IS_SENT_INCORRECTLY(40056, "分账数据上送有误，分账层级最多 3 级，分账会员数最多 10 个！"),
    EXCEEDED_PAYMENT_CHANNEL_LIMIT(40057, "超过支付通道限额"),
    CHECK_BANK_POSITION_ERRORS(40058, "查询银行头寸错误"),
    FAILED_TO_RE_SEND_THE_ORDER(40059, "订单重发短信失败"),
    WRONG_AMOUNT(40060, "金额错误"),
    THE_AMOUNT_EXCEEDS_THE_ALLOWABLE_RANGE(40061, "金额超过允许范围"),
    NON_DEPOSITORY_BANK(40064, "非存管银行"),
    ORDERS_ARE_NOT_ALLOWED_TO_BE_CLOSED(40065, "订单不允许关闭"),
    //账户类错误
    INSUFFICIENT_ACCOUNT_BALANCE_Q(50001, "账户余额不足"),
    ACCOUNT_HAS_BEEN_FROZEN(50002, "账户已冻结"),
    INSUFFICIENT_FROZEN_BALANCE(50003, "冻结余额不足"),
    FREEZE_RECORD_DOES_NOT_EXIST(50004, "冻结记录不存在"),
    MEMBER_CORRESPONDING_TO_INTERNAL_ACCOUNTOR_THE_ACCOUNT_TYPE_IS_INCONSISTENT(50005, "内部账户对应的会员或账户类型不一致"),
    ACCOUNT_DOES_NOT_EXIST(50006, "账户不存在"),
    //其他
    OTHER_ERRORS(9000, "其他错误"),
    UNKNOWN_MISTAKE(9100, "未知错误"),
    DATABASE_ERROR(9200, "数据库错误"),
    EXTERNAL_ERROR(9300, "外部错误"),
    REQUEST_TIMED_OUT(9400, "请求超时"),
    HTTP_COMMUNICATION_ERROR(9500, "http通信错误(通信过程出错或返回码不为200)"),
    SYSTEM_ERROR(9999, "系统错误")
    ;

    private Integer code;

    AllInPayErrorCodeEnum(Integer code, String msg) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return LanguageHolder.getName(this.getClass(),this.code);
    }

}
